-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance: Fixes query improvement to load values lazily #2869
Conversation
Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryClientCore.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Program.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/Pagination/QueryPage.cs
Outdated
Show resolved
Hide resolved
dce469c
to
334d895
Compare
Can you please share the numbers? Also one clarification: Do lazy materialization expose any gaps in the reference/buffer management? |
Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/Pagination/QueryPage.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryClientCore.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryClientCore.cs
Outdated
Show resolved
Hide resolved
I have updated the number in the PR description. It showed improvement in memory allocation and op/s for some cases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except for minor comments
Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryClientCore.cs
Outdated
Show resolved
Hide resolved
71102c8
to
2bb23af
Compare
If I am reading right, for multipage interactions with the change is there RPS regression? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except some extra comments regarding testing and code duplicity
Prev results were from local. Now I ran benchmark on a VM and now you can notice the improvement in RPS and memory allocated also. |
This reverts commit 8582f22c6b757900cb1c6a138575895a326c14b0.
8582f22
to
a8ddeff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - Just a nit
Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - Thanks
Description
Loading values lazily in
CosmosQueryClientCore
in order to avoid execution on each request .Locally, Performance tests shows below number :
Without This PR
With this PR
Here, you can notice the improvement in total memory allocated and Op/s across the board.
Type of change
Closing issues
Fixes 2,3 of the 3 issues: #2815